package cc.miwuya.community.api;

import cc.miwuya.common.util.Result;
import cc.miwuya.community.domain.Residential;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author 迷雾森林
 * @Date 2024-02-24 10:11
 * 小区操作api
 */

public interface ResidentialApi {
    @GetMapping("/community/residential/list")
    public Result list();

    @PostMapping("/community/residential/edit")
    public Result edit(@RequestBody Residential residential);

    /**
     * 获取小区信息
     *
     * @param id
     * @return
     */
    @GetMapping("/community/residential/info/{id}")
    public Result info(@PathVariable Long id);

    /**
     * 根据ID删除小区
     *
     * @param id
     * @return
     */
    @GetMapping("/community/residential/delete/{id}")
    public Result delete(@PathVariable Long id);

    /**
     * 根据物业id获取所有小区
     */
    @GetMapping("/community/residential/list/property/{id}")
    public Result getResidentialListByPropertyId(@PathVariable Long id);
    /**
     * 根据物业id获取所有小区Id
     */
    @GetMapping("/community/residential/list/propertyId/{id}")
    public List<Long> getResidentialIdByPropertyId(@PathVariable Long id);

    /**
     * 获取所有小区 不分页
     */
    @GetMapping("/community/residential/getAllResidential")
    public Result getResidentialList();
}
